<?php
/**
 * eBay Label Printing Program Article Form Class 
 * This is a Form Class , it provide Article Modify Form for Backoffice 
 * @package  eBayLabelPrinter
 * @category Forms
 * @author   Norman Dong <norman.dong@hotmail.com>
 * @version  Initial
 * @copyright LeadCasket.com
 * @link     www.leadcasket.com
 * @license  Commercial
 * @todo   At the moment , this is NO validuator at all , I assue all input is correct
 */
class Form_Cms_Article extends Zend_Form
{
	/**
	 * Form construct function 
	 * Form have The following Elements 
	 * $articleID,$articleTitle,$articleDate,$articlePosition,$articleFrontPage,$articleSection,$articleCategory,$articleContent,$submit  
	 */
	
    public function __construct($options = null){
		
		parent::__construct($options);
		
		$articleID = new Zend_Form_Element_Text('id_article');
		$articleID->setLabel('Article ID');

		$articleTitle = new Zend_Form_Element_Text('title_article');
		$articleTitle->setLabel('Article Title');

		$articleDate = new Zend_Form_Element_Text('date_article');
		$articleDate->setLabel('Article Date');
		
		$articlePosition = new Zend_Form_Element_Text('position_article');
		$articlePosition->setLabel('Article Position');								
		
		//should be radio
		$articleFrontPage = new Zend_Form_Element_Checkbox('frontpage_article');
		$articleFrontPage->setLabel('Article On Front Page');
		
		//selection
		$articleSection = new Zend_Form_Element_Text('section_article');
		$articleSection->setLabel('Article Section');
		//selection
		$articleCategory = new Zend_Form_Element_Text('category_article');
		$articleCategory->setLabel('Article Category');
		
		$articleContent = new Zend_Form_Element_Text('content_article');
		$articleContent->setLabel('Article Content');

		$submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');		
		
		$this->addElements(array($articleID,$articleTitle,$articleDate,$articlePosition,$articleFrontPage,$articleSection,$articleCategory,$articleContent,$submit));				

		
		}
	}